package com.example.demo.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;

import com.example.demo.entity.Stu;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @Author lands
 * @Date 2024/10/22 10:10
 * @Description TODO
 */

public interface StuMapper extends BaseMapper<Stu> {
//    根据学生名字查找学生
    @Select("SELECT * from stu WHERE name = #{name}")
    Stu selectByName(String name);

    List<Stu> getAllList();

    int delete(int id);

    int add(@Param("name") String name , @Param("no")String no , @Param("age")int age);

    int updateXml(@Param("name") String name , @Param("no")String no ,
                  @Param("age")int age ,@Param("id")int id);
}
